//
//  ZLUnidentificationMessageContentView.m
//  ZLYoYoIM-ZLYoYoIM
//
//  Created by 赵磊 on 2021/1/21.
//

#import "ZLUnidentificationMessageContentView.h"
#import "UIImage+ZLIMCustom.h"

@implementation ZLUnidentificationMessageContentView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        UIButton *iconItem = [[UIButton alloc] initWithFrame:CGRectMake(20.0, 10.0, 40.0, 40.0)];
        [iconItem setImage:[UIImage imageNamedInIM:@"tianchongxing"] forState:UIControlStateNormal];
        [self addSubview:iconItem];
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(70.0, 10.0, 170.0, 20.0)];
        label.font = [UIFont boldSystemFontOfSize:14.0];
        label.textColor = [UIColor colorWithWhite:138 / 255.0 alpha:1.0];
        label.text = @"未识别的消息类型";
        [self addSubview:label];
        
        label = [[UILabel alloc] initWithFrame:CGRectMake(70.0, 30.0, 170.0, 20.0)];
        label.font = [UIFont systemFontOfSize:12.0];
        label.textColor = [UIColor colorWithWhite:138 / 255.0 alpha:1.0];
        label.text = @"暂时不支持该类型消息的展示";
        [self addSubview:label];
    }
    return self;
}

- (void)refresh:(NIMMessageModel*)data{
    //务必调用super方法
    [super refresh:data];
}

@end
